﻿ <!-- row -->
<div class="row">
    <!-- section-title -->
    <div class="col-md-12">
        <div class="section-title">
            <h2 class="title">今日特惠</h2>
            <div class="pull-right">
                <div class="product-slick-dots-1 custom-dots"></div>
            </div>
        </div>
    </div>
    <!-- /section-title -->
    <!-- banner -->
    <div class="col-md-3 col-sm-6 col-xs-6">
        <div class="banner banner-2">
            <img src="~/FrontDesk/img/banner14.jpg" alt="">
            <div class="banner-caption">
                <button class="primary-btn">Shop Now</button>
            </div>
        </div>
    </div>
    <!-- /banner -->
    <!-- Product Slick -->
    <div class="col-md-9 col-sm-6 col-xs-6">
        <div class="row">
            <div id="product-slick-1" class="product-slick">
                @foreach (var item in Model)
                {
                    <!-- Product Single -->
                    <div class="product product-single">
                        <div class="product-thumb">
                            <div class="product-label">
                                <span>New</span>
                                <span class="sale">-20%</span>
                            </div>
                            <ul class="product-countdown">
                                <li><span>00 H</span></li>
                                <li><span>00 M</span></li>
                                <li><span>00 S</span></li>
                            </ul>
                            <button class="main-btn quick-view"><i class="fa fa-search-plus"></i> Quick view</button>
                            <img src="@ViewBag.AdminUrl/@item.Shopimage" style="max-width:250px;height:200px;" />
                        </div>
                        <div class="product-body">
                            <h3 class="product-price">$32.50 <del class="product-old-price">$45.00</del></h3>
                            <div class="product-rating">
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star-o empty"></i>
                            </div>
                            <h2 class="product-name"><a href="#">@item.ShopName</a></h2>
                            <div class="product-btns">
                                <button class="main-btn icon-btn"><i class="fa fa-heart"></i></button>
                                <button class="main-btn icon-btn"><i class="fa fa-exchange"></i></button>
                                <button class="primary-btn add-to-cart AddCart1" name="@item.ShopId"><i class="fa fa-shopping-cart"></i> 加入购物车</button>
                            </div>
                        </div>
                    </div>
                    <!-- /Product Single -->
                }

            </div>
        </div>
    </div>
    <!-- /Product Slick -->
</div>
<script>

    //Demo
    layui.use('form', function () {
        var form = layui.form;
        var $ = layui.$;
        $(".AddCart1").click(function () {
            var con = $(this).attr("name");
            console.log(con);
            $.ajax({
                url: "/Home/AddCart",
                type: "post",
                data: { id: con },
                success: function (re) {
                    if (re.success) {
                        layer.msg(re.msg);
                    } else {
                        layer.msg(re.msg);
                    }
                }
            });
        });

    });

</script>
<!-- /row -->
